﻿using System;
namespace Host
{
    [AttributeUsage(AttributeTargets.Method)]
    public class IComponentsMethodAttribute : Attribute
    {
        public IComponentsMethodAttribute() { }
        public IComponentsMethodAttribute(string mappingname) { MappingName = mappingname; }
        public IComponentsMethodAttribute(string mappingname, bool disable) { Disable = disable; }

        /// <summary>
        /// Gets or sets the name of the mapping.
        /// </summary>
        /// <value>The name of the mapping.</value>
        public string MappingName { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="T:Host.IComponentsMethodAttribute"/> is disable.
        /// </summary>
        /// <value><c>true</c> if disable; otherwise, <c>false</c>.</value>
        public bool Disable { get; set; }

        /// <summary>
        /// 预校验函数名
        /// </summary>
        public string PreCheckFuncName { get; set; }
    }
}
